package thread;

/*
 * @author zzr
 * @date: 2025/04/16  19:58
 * @description: 懒汉模式~
 */
class SingletonLazy {
    private static volatile SingletonLazy instance = null;
    static Object locker = new Object();

    public static SingletonLazy getInstance() {

        if (null == instance) {
            synchronized (locker) {
                if (null == instance) {
                    instance = new SingletonLazy();
                }
            }
        }
        return instance;
    }
    private SingletonLazy() {}
}
public class Thread17 {
}
